<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>侧边导航栏</title>
    <link rel="stylesheet" href="css/font-awesome.css">
    <link rel="stylesheet" href="css/bootstrap.css">
    <!-- <link rel="stylesheet" href="css/style.css"> -->
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        a {
            text-decoration: none
        }

        html,
        body {
            height: 100%;
            background: linear-gradient(45deg, rgb(160, 191, 124), rgb(255, 255, 255)) fixed;
        }

        body {
            background: url('../images/beijing.png') 100% 80% / cover no-repeat;
            /* background-color: linear-gradient(rgb(160, 191, 124), rgb(101, 147, 74)); */
            background-size:60%;
        }

        .menu-wrap {
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            width: 55px;
            background-color: #f5f5f5;
            box-shadow: 1px 0 15px rgba(0, 0, 0, 0.07);
            overflow: hidden;
        }

        .menu-wrap:hover {
            width: 250px;
        }

        .menu {
            position: absolute;
            left: 0;
            top: 80px;
            bottom: 80px;
            width: 250px;
            overflow-y: auto;
            margin-top: 80px;
        }

        .menu li {
            height: 42px;
            line-height: 42px;

        }

        .menu li:hover {
            background-color: rgb(160, 190, 117);
        }

        .menu li:hover a {
            color: #fff;
        }

        .menu a {
            display: block;
            columns: #8a8a8a;
            border-top: 1px solid #e9e9e9;
        }

        .menu i {
            display: inline-block;
            width: 55px;
            text-align: center;
            font-size: 18px;
        }

        .menu span {
            font-size: 14px;
        }

        /* 侧边头像 */
        #headPic {
            width: 80px;
            height: 80px;
            border: 1px solid #ccc;
            border-radius: 75px;
            margin-left: 80px;
            /* margin:20px auto; */
            position: relative;
            overflow: hidden;
            top: 50px;
        }

        #headPicimg {
            width: 80px;
            height: 80px;
        }

        #headPic:hover #mask {
            display: block;
        }

        #mask {
            width: 150px;
            height: 150px;
            background-color: rgba(0, 0, 0, 0.5);
            position: absolute;
            left: 0;
            top: 0;
            display: none;
        }

        #innerImg {
            position: absolute;
            left: 25%;
            top: 25%;
            transform: translate(-50%, -50%);
            /*适用于不清楚自己的尺寸情况*/
        }

        #zhongjianbufen {
            width: 1200px;
            height: 520px;
            border: 1px solid #ccc;
            margin: 70px auto;
            background-color: rgba(248, 241, 241, 0.7);



        }

        #zhongjianbufen1 {
            width: 300px;
            height: 70px;
            /* border:1px solid #ccc; */
            margin: 30px auto;
            text-align: center;
            color:black;
            font-size: 26px;
            line-height: 70px;
            position: relative;
            top: 40px;

        }

        #zhongjianbufen2 {
            width: 300px;
            height:40px;
            /* border:1px solid #ccc; */
            margin: 0px auto;
            text-align: center;
            color: #aaa;
            font-size: 22px;
            /* line-height: 50px; */
            position: relative;
            top: 20px;
            /* LEFT:0PX; */
        }

        /* //122 */
        .media-object {
            height: 300px;
            width: 200px;
            margin-top: 40px;
            border-radius: 47%;
            margin: 0 auto;
             /* border: 1px solid #ccc; */
            border: 5px solid olive;
          
        }

        .media-heading {

            margin-left: 80px;
        }

        .text-muted {
            color: black;
            margin-left: 80px;
            font-size: 16px;
        }

        #media-top {
            margin: 0 auto;
            /* border: 1px solid #ccc; */
            width: 250px;
            height: 100px;
            text-align: center;
        }

        #media-top span {
            color: peru;
        }
        #media-top h1{
            color:#555;
        }
        #media{
        width: 800px;
        height: 460px;
        /* border: 1px solid #cccc; */
        margin: 10px auto;
        }
       .media-left{
        width: 300px;
        height:450px;
        /* border: 1px solid #ccc; */
        }
        .media-right{
        width: 490px;
        height:450px;
        /* border: 1px solid #ccc; */
        }
        .media-right p{
            text-align: center;
            font-size:18px;
            color:#555;
        }
    </style>
    <script>
        window.onload = function () {
            document.querySelector('#headPic').onclick = function () {
                document.querySelector('#headPic input').click()     //模拟表单元素被单击
            }
        }
        function changeHeadPic() {
            //1.获取图片文件
            var fileHead = document.querySelector('#headPic input').files[0]
            //2.文件读取图片
            var fread = new FileReader()
            fread.onload = function (e) {
                //3.把图片显示在页面中
                document.querySelector('#headPic>img').src = e.target.result
            }
            fread.readAsDataURL(fileHead)
        }
    </script>

</head>

<body>
    <nav class="menu-wrap">
        <div id="headPic">
            <img id="headPicimg" src="images/icon_shangjie.gif" alt="">
            <div id="mask">
                <img id="innerImg"
                    src=""
                    alt="">
            </div>
            <form action="#">
                <input type="file" name="" id="" accept="image/jpg" onchange="changeHeadPic()" style="display:none">
            </form>
        </div>


        <div class="menu">
            <ul>

                <li>
                    <a href="shouye.html">
                        <i class="fa fa-home fa-lg"></i>
                        <span class="nav-text">首页</span>
                    </a>
                </li>
                <li>
                    <a href="edit.html">
                        <i class="fa fa-bullhorn fa-lg"></i>
                        <span class="nav-text">编辑资料</span>
                    </a>
                </li>
                <li>
                    <a href="sharemenu.html">
                        <i class="fa fa-user fa-lg"></i>
                        <span class="nav-text">上传菜谱</span>
                    </a>
                </li>
                <li>
                    <a href="personal.html">
                        <i class="fa fa-envelope-o fa-lg"></i>
                        <span class="nav-text">已发布的内容</span>
                    </a>
                </li>
                <li>
                    <a href="shoucang.html">
                        <i class="fa fa-heart-o fa-lg"></i>
                        <span class="nav-text">收藏</span>
                    </a>
                </li>
                <li>
                    <a href="integral.html">
                        <i class="fa fa-shopping-bag fa-lg"></i>
                        <span class="nav-text">积分兑换</span>
                    </a>
                </li>
            </ul>
        </div>
    </nav>
    <div id="zhongjianbufen1">
        <h1>恰饭吧</h1>
    </div>
    <div id="zhongjianbufen2">人为生而食，非为食而生</div>
    <div id="zhongjianbufen">
        <div id="media-top">
            <h1><span>—></span>故事吧<span>
                    <—</span> </h1> <p>BRAND STORY</p>
        </div>
        <divbb3 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        id="media">
            <div class="media-left">
                <a href="#">
                    <img class="media-object" src="images/gushi.jpg" alt="...">
                </a>
            </div>
            <div class="media-right">
                <p>当天边出现第一缕丝光，</p>
                <p>开始出现稀碎的声音，</p>
                <p>美食味开始出现了，</p>
                <p>穿过厨房，</p>
                <p>满载着扑面而来的诱惑，</p>
                <p>令人流连的味道</p>
                <p>出现在每一所府邸</p>
                <p>随后，欢快的一天</p>
                <p>悠然开始.....</p>
            </div>
        </div>




    </div>
    </div>
    </div>
</body>

</html>